package com.note.simpleadmin.entity;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Objects;

/***
 *@ClaseName:TbGoodsSpec
 *
 *@Decription:
 *
 *@Author: xubingbing
 *
 *@Date:2019/1/27 0027 14:14
 */
@Entity
@Table(name = "tb_goods_spec", schema = "simpleshop", catalog = "")
public class TbGoodsSpec {
    private String id;
    private String name;
    private Integer hot;
    private Integer discount;
    private Integer stock;
    private BigDecimal costPrice;
    private String goodsId;
    private Integer stockWarning;
    private BigDecimal salePrice;
    private BigDecimal marketPrice;
    private Integer active;
    private Integer saleNum;
    private Integer surplusNum;
    private Integer isDelete;
    @Basic
    @Column(name = "is_delete")
    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    @Basic
    @Column(name = "surplus_num")
    public Integer getSurplusNum() {
        return surplusNum;
    }

    public void setSurplusNum(Integer surplusNum) {
        this.surplusNum = surplusNum;
    }

    @Basic
    @Column(name = "sale_num")
    public Integer getSaleNum() {
        return saleNum;
    }

    public void setSaleNum(Integer saleNum) {
        this.saleNum = saleNum;
    }

    @Basic
    @Column(name = "active")
    public Integer getActive() {
        return active;
    }

    public void setActive(Integer active) {
        this.active = active;
    }
    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    @Id
    @Column(name = "id")
    public String getId() {
        return id;
    }
    @Basic
    @Column(name = "sale_price")
    public BigDecimal getSalePrice() {
        return salePrice;
    }

    public void setSalePrice(BigDecimal salePrice) {
        this.salePrice = salePrice;
    }
    @Basic
    @Column(name = "market_price")
    public BigDecimal getMarketPrice() {
        return marketPrice;
    }

    public void setMarketPrice(BigDecimal marketPrice) {
        this.marketPrice = marketPrice;
    }

    public void setId(String id) {
        this.id = id;
    }



    @Basic
    @Column(name = "hot")
    public Integer getHot() {
        return hot;
    }

    public void setHot(Integer hot) {
        this.hot = hot;
    }

    @Basic
    @Column(name = "discount")
    public Integer getDiscount() {
        return discount;
    }

    public void setDiscount(Integer discount) {
        this.discount = discount;
    }

    @Basic
    @Column(name = "stock")
    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }

    @Basic
    @Column(name = "cost_price")
    public BigDecimal getCostPrice() {
        return costPrice;
    }

    public void setCostPrice(BigDecimal costPrice) {
        this.costPrice = costPrice;
    }

    @Basic
    @Column(name = "goods_id")
    public String getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(String goodsId) {
        this.goodsId = goodsId;
    }


    @Basic
    @Column(name = "stock_warning")
    public Integer getStockWarning() {
        return stockWarning;
    }

    public void setStockWarning(Integer stockWarning) {
        this.stockWarning = stockWarning;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbGoodsSpec that = (TbGoodsSpec) o;
        return id == that.id &&
                Objects.equals(hot, that.hot) &&
                Objects.equals(discount, that.discount) &&
                Objects.equals(stock, that.stock) &&
                Objects.equals(costPrice, that.costPrice) &&
                Objects.equals(goodsId, that.goodsId) &&
                Objects.equals(salePrice, that.salePrice)&&
                Objects.equals(marketPrice, that.marketPrice)&&
                Objects.equals(stockWarning, that.stockWarning)&&
                Objects.equals(saleNum, that.saleNum)&&
                Objects.equals(surplusNum, that.surplusNum);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, hot, discount, stock, costPrice, goodsId, stockWarning,salePrice,marketPrice);
    }
}
